async function getComments(AVID, limits = 2, delay = 0, bookType = "xlsx") {
    let first = await fetch("https://api.bilibili.com/x/v2/reply?pn=1&type=1&oid=" + AVID + "&sort=1").then((res) => res.json());
    let total = first.data.page.acount;
    console.log(total);
    let resArray = await spider.Ajax({
        urls: [...Array(Math.floor(total / 20)).keys()].map((i) => "https://api.bilibili.com/x/v2/reply?pn=" + (i + 1) + "&type=1&oid=" + AVID + "&sort=1"),
        returnType: "json",
        type: "start",
        options: {
            cache: "force-cache",
        },
        limits,
        time: delay,
    });
    console.log(resArray);
    let afterParse = resArray.map((i) => i.data.replies).flat();

    // 注意 sheetjs无法保存二级的对象，即对象嵌套的数据

    // 直接进行下载
    await downloadSheet(afterParse, "视频评论区-" + new Date().getTime(), bookType);
}
export { getComments };
